package com.yundahh.u8c.enums;

public enum OperationType {
    INSERT("insert"),
    DELETE("delete"),
    UPDATE("update"),
    APPROVE("approve"),
    QUERY("query");
    private String value;
    OperationType(String value) {
        this.value = value;
    }
    public String getValue() {
        return value;
    }
    public static OperationType getOperationType(String value) {
        for (OperationType operationType : OperationType.values()) {
            if (operationType.getValue().equals(value)) {
                return operationType;
            }
        }
        return null;
    }
    public static OperationType getOperationType(int value) {
        for (OperationType operationType : OperationType.values()) {
            if (operationType.getValue().equals(value)) {
                return operationType;
            }
        }
        return null;
    }

}
